import React from 'react';
import { Switch } from 'antd';

interface IsDisabledProps {
  isChecked: boolean;
  handleChecked: any;
}

const IsDisabled: React.FC<IsDisabledProps> = ({
  isChecked,
  handleChecked,
}) => {
  return (
    <Switch
      checkedChildren="启用"
      unCheckedChildren="禁用"
      defaultChecked={isChecked}
      onChange={handleChecked}
    />
  );
};

export default IsDisabled;
